const fs = require('fs')

function readFile (...args) {
	return new Promise((resolve, reject) => {
		fs.readFile(...args, (err, data) => {
			if (err) {
				return reject(err)
			}
			resolve(data)
		})
	})
}

readFile('./log/a.log', 'utf8')
	.then(data => {
		console.log(data)
		return readFile('./log/b.log', 'utf8')
	})
	.then(data => {
		console.log(data)
		return readFile('./log/c.log', 'utf8')
	})
	.then(data => {
		console.log(data)
	})